<%@ page contentType="text/html; charset:utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="header.jsp">
	<jsp:param name="title" value="添加用户组"/>
</jsp:include>
<form action="${requestScope.config.site_root}/admin?c=group&a=add" method="post" name="myform" onSubmit="return checkForm()">
<table cellpadding="2" cellspacing="1" class="table_form">
	<caption><c:choose><c:when test="${null ne requestScope.group}">编辑用户组</c:when><c:otherwise>添加用户组</c:otherwise></c:choose></caption>
	<tr>
		<th><strong>组名</strong></th>	
		<td><input type="text" name="groupname"<c:if test="${null ne requestScope.group}"> value="${requestScope.group.groupname}"</c:if>></td>
		<td><input type="submit" name="doadd" value=" 确定 " class="button_style"></td>
	</tr>
</table>
	<c:if test="${null ne requestScope.group}"><input type="hidden" name="groupid" value="${requestScope.group.groupid}"></c:if>
</form>
<jsp:include page="footer.jsp"/>
<script type="text/javascript">
function checkForm() {
	if(myform.groupname.value == '') {
		alert('组名不能为空！');
		return false;
	}
	return true;
}
</script>